import { baseURL,baseIP} from "./request.js";

export function creatWebsocket() {
  let socket = new WebSocket(`ws://${baseIP}:3030`);
  socket.addEventListener("open", () => {
    console.log("connection is opening");
  });

  socket.addEventListener("close", () => {
    console.log("connection is closing");
  });

  socket.addEventListener("error", (err) => {
    console.log(err);
  });

  return socket;
}
